<?php
    $serverpath=$_SERVER['DOCUMENT_ROOT'];
	include ($serverpath.'/Classes/Client.php');
	$serial_client = file_get_contents('store_client');
	$client = unserialize($serial_client);
	$client->set_firstname($_POST['firstname']);
	$client->set_lastname($_POST['lastname']);
	$client->set_password($_POST['password']);
	$client->set_birthdate($_POST['birthdate']);
	$client->set_country($_POST['country']);
	$client->set_address($_POST['address']);
	$client->set_zipCode($_POST['zipCode']);
	$client->set_city($_POST['city']);
	$client->set_cardtype($_POST['cardtype']);
	$client->set_cardNumber($_POST['cardnumber']);
	$client->savetofile($client->get_id());
	$client->savepassword($client->get_id());
	$serialize_client = serialize($client);
	file_put_contents('store_client',$serialize_client);
	header('Location: profile.php');
?>